package com.zzw.hj23;

import java.util.Scanner;

/**
 * @Project: hw_java
 * @Description: 删除字符串中出现次数最少的字符
 * @Author: zzw
 */
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        int[] total = new int[26];
        for (int i = 0; i < str.length(); i++) {
            total[str.charAt(i) - 'a']++;
        }
        int minCount = 21;
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < 26; i++) {
            if (total[i] > 0 && total[i] < minCount) {
                minCount = total[i];
            }
        }
        for (int i = 0; i < str.length(); i++) {
            if (total[str.charAt(i) - 'a'] != minCount) {
                sb.append(str.charAt(i));
            }
        }
        System.out.println(sb);
    }
}